package kr.saeildamil.androidstudy;

import kr.saeildamil.androidstudy.ch04.ButtonAndEditText;
import kr.saeildamil.androidstudy.ch04.ImageViewTest;
import kr.saeildamil.androidstudy.ch05.GravityEx1;
import kr.saeildamil.androidstudy.ch05.PaddingEx;
import kr.saeildamil.androidstudy.ch05.RelativeEx;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.btnandedit_btn:
			startActivity(new Intent(this, ButtonAndEditText.class));
			break;
		case R.id.btnandedit_btn2:
			startActivity(new Intent(this, ImageViewTest.class));
			break;
		case R.id.main_weight_btn:
			startActivity(new Intent(this, GravityEx1.class));
			break;
		case R.id.main_padding_btn:
			startActivity(new Intent(this, PaddingEx.class));
			break;
		case R.id.main_relative_btn:
			startActivity(new Intent(this, RelativeEx.class));
			break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
